<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="java.sql.*"%>

<%
	String chk = request.getParameter("chk");

	Class.forName("com.mysql.jdbc.Driver");

	Connection conn = null;
	PreparedStatement stmt = null;
	ResultSet rs = null;

	String url = "jdbc:mysql://localhost:3306/mydb";
	String username = "root";
	String password = "6473";
	conn = DriverManager.getConnection(url, username, password);

	String sql = "delete from namecard where id=?";

	stmt = conn.prepareStatement(sql);
	stmt.setInt(1, Integer.parseInt(chk));
	stmt.executeUpdate();
%>

